package org.yun.common.utils.redis;

/**
 * redis 常量
 */
public class RedisConsts {

    /* ***************************** 平台级别的缓存设置开始 ***************************** */
    // 系统setting
    public static final String SYSTEM_SETTING = "system:setting:setting";
    // 系统标准编码：stdCode:编码类型名称:是否显示不可用
    public static final String SYSTEM_STDCODE_LIST = "system:stdCode:list:";
    public static final String SYSTEM_STDCODE_MAP = "system:stdCode:map:";
    /* ***************************** 平台级别的缓存设置开始 ***************************** */

    /* ************************* web-admin 设置开始 *********************************/
    // shiroSession的redis-key
    public static final String ADMIN_SHIRO_SESSION_KEY = "admin:shiro_redis_session:";
    // shiroSession的过期时间，单位：秒，此值须大于spring-cache.xml中的全局session有效期
    public static final int ADMIN_SHIRO_SESSION_EXPIRE = 3600;
    // shiroRealm的redis-key
    public static final String ADMIN_SHIRO_REALM_KEY = "admin:shiro_redis_realm:";
    // shiroRealm的过期时间，单位：秒，设置与SHIRO_SESSION_EXPIRE相等
    public static final int ADMIN_SHIRO_REALM_EXPIRE = 3600;
    // intfc RSA非对称加密Redis-key
    public static final String ADMIN_RSA_PRIVATE_KEY = "admin:rsa_private_key:";
    public static final int ADMIN_RSA_PRIVATE_KEY_EXPIRE = 18000;
    // 图片验证码过期时间，单位：秒
    public static final String ADMIN_REDIS_CAPTCHA_KEY = "admin_redis_captcha:";
    public static final int ADMIN_CAPTCHA_EXPIRE = 300;
    /* ************************* web-intfc 设置结束 *********************************/

    /* ***************************** 系统微信公众平台设置开始 ***************************** */
    public static final String WX_PUBLIC_ACCESSTOKEN = "wx:public:accesstoken";
    public static final String WX_PUBLIC_ACCESSTOKENLOCK = "wx:public:accesstokenLock";
    public static final String WX_PUBLIC_JSTICKET = "wx:public:jsTicket";
    public static final String WX_PUBLIC_JSTICKETLOCK = "wx:public:jsTicketLock";
    public final static String WX_LOGIN_AUTH_STATE = "wx:login:auth:state:";
    public final static int WX_LOGIN_AUTH_STATE_EXPIRE = 10 * 60;
    /* ***************************** 系统微信公众平台设置结束 ***************************** */

    /* ************************* 接口Token参数设置 START ********************************/
    public final static String INTERFACE_USERID = "interface:userid:";
    public final static int INTERFACE_USERID_EXPIRE = 60 * 60 * 24 * 30;
    /* ************************* 接口Token参数设置 END   ********************************/


}
